<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	template="/pages/templates/TemplateAdmin.xhtml">

	<ui:define name="titre">Fun With Videos</ui:define>
	<ui:define name="content">
		<h:head>
		</h:head>
		<h:body>

			<h:form>
				<fieldset>
					<legend>
						<strong>Ajout d'une vidéo</strong>
					</legend>

					<table>
						<tr>
							<td>Titre</td>
							<td><h:inputText id="nom"
									value="#{mbCreationVideo.nouvelleVideo.nom}" required="true"></h:inputText>
								<h:message for="nom" styleClass="Red" /></td>
						</tr>
						<tr>
							<td>Durée (min)</td>
							<td><h:inputText id="duree"
									value="#{mbCreationVideo.nouvelleVideo.duree}"></h:inputText> <h:message
									for="duree" styleClass="Red" /></td>
						</tr>
						<tr>
							<td>Disponible le :</td>
							<td><p:calendar
									value="#{mbCreationVideo.nouvelleVideo.dateMiseAdispo}"
									navigator="true" id="popupButtonCal">
									<p:ajax event="dateSelect" update="menuTarifs"
										listener="#{mbCreationVideo.initialiserListeTarifs}"></p:ajax>
								</p:calendar></td>
						</tr>
						<tr>
							<td>Jusqu'au :</td>
							<td><p:calendar
									value="#{mbCreationVideo.nouvelleVideo.dateFinMiseADispo}"
									navigator="true" id="popupButtonCal2">
									<p:ajax event="dateSelect" update="menuTarifs"
										listener="#{mbCreationVideo.initialiserListeTarifs}"></p:ajax>
								</p:calendar></td>
						</tr>
						<tr>
							<td>Nom de l'affiche :</td>
							<td><h:inputText id="affiche"
									value="#{mbCreationVideo.nouvelleVideo.affiche}"></h:inputText>
								<h:message for="affiche" styleClass="Red" /></td>
						</tr>
						<tr>
							<td>Tarif :</td>
							<td><h:selectOneMenu id="menuTarifs"
									value="#{mbCreationVideo.idTarifChoisi}">
									<f:selectItems value="#{mbCreationVideo.lesTarifs}" var="t"
										itemLabel="#{t.libelle}" itemValue="#{t.idTarif}"></f:selectItems>
								</h:selectOneMenu></td>
						</tr>
						<tr>
							<td></td>
							<td></td>
						</tr>
					</table>

				</fieldset>
				<div class="divBtn">
					<h:commandButton value="Ajouter vidéo"
						action="#{mbCreationVideo.ajouterVideo}" class="btn"></h:commandButton>
				</div>
				<br />
			</h:form>
		</h:body>
	</ui:define>
</ui:composition>
